package com.share.design.iterator.demo01;

/**
 * @author caifan
 * @since 2022/11/7
 */
public class TopicList implements ListList<Topic> {
    private final Topic[] topics;

    public TopicList(Topic[] topics) {
        this.topics = topics;
    }

    @Override
    public IteratorIterator<Topic> iterator() {
        return new TopicIterator(topics);
    }
}
